package org.dtrd.modules.drug.entity.bean;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.drug.entity.po.DtrdExtEmsYwDrugs;

import java.util.Date;

/**
 * <p>
 * 药品库
 * </p>
 *
 * @author QR
 * @since 2021-12-02
 */
@Getter
@Setter
@ApiModel(value = "Drugs数据传输", description = "药品库")
public class DrugDetail {

    private Integer dataId;

    @ApiModelProperty("所属分类")
    private Integer drugCategoryid;

    @ApiModelProperty("药品名称")
    private String drugName;

    @ApiModelProperty("主要成分（及其化学名称）")
    private String drugComponent;

    @ApiModelProperty("性状")
    private String drugProperty;

    @ApiModelProperty("规格型号")
    private String drugSpec;

    @ApiModelProperty("用法用量")
    private String drugUsage;

    @ApiModelProperty("不良反应")
    private String drugUntoward;

    @ApiModelProperty("禁忌")
    private String drugTaboo;

    @ApiModelProperty("适应症")
    private String drugIndication;

    @ApiModelProperty("药物相互作用")
    private String drugInteract;

    @ApiModelProperty("药物过量")
    private String drugOverdose;

    @ApiModelProperty("药理毒理")
    private String drugPharmacology;

    @ApiModelProperty("注意事项")
    private String drugBeCareful;

    @ApiModelProperty("创建时间")
    private Date drugCreateTime;

    @ApiModelProperty("药材库标签")
    private String drugTips;

    @ApiModelProperty("创建人")
    private Integer drugCreater;

    @ApiModelProperty("最后编辑人")
    private Integer drugEditor;

    @ApiModelProperty("最后编辑时间")
    private Date drugEditTime;

    @ApiModelProperty("删除人")
    private Integer drugDeleter;

    @ApiModelProperty("删除时间")
    private Date drugDelTime;

    @ApiModelProperty("药品URL")
    private String drugUrl;

    @ApiModelProperty("药品图片")
    private String drugThumb;

    @ApiModelProperty("贮藏")
    private String drugStorage;

    @ApiModelProperty("包装")
    private String drugPacking;

    @ApiModelProperty("有效期")
    private String drugExpirydate;

    @ApiModelProperty("批准文号")
    private String drugApproval;

    @ApiModelProperty("生产企业")
    private String drugCompany;

    @ApiModelProperty("通用名称")
    private String drugNameGeneral;

    @ApiModelProperty("用药方案 1-口服药,2-胰岛素针,3-GLP-1类似物,4-其他")
    private Integer drugUse;

    public DrugDetail parseFromPo(DtrdExtEmsYwDrugs po) {
        dataId = po.getDataId();
        drugCategoryid = po.getDrugCategoryid();
        drugName = po.getDrugName();
        drugComponent = po.getDrugComponent();
        drugProperty = po.getDrugProperty();
        drugSpec = po.getDrugSpec();
        drugUsage = po.getDrugUsage();
        drugUntoward = po.getDrugUntoward();
        drugTaboo = po.getDrugTaboo();
        drugIndication = po.getDrugIndication();
        drugInteract = po.getDrugInteract();
        drugOverdose = po.getDrugOverdose();
        drugPharmacology = po.getDrugPharmacology();
        drugBeCareful = po.getDrugBeCareful();
        drugCreateTime = po.getDrugCreateTime();
        drugTips = po.getDrugTips();
        drugCreater = po.getDrugCreater();
        drugEditor = po.getDrugEditor();
        drugEditTime = po.getDrugEditTime();
        drugDeleter = po.getDrugDeleter();
        drugDelTime = po.getDrugDelTime();
        drugUrl = po.getDrugUrl();
        drugThumb = po.getDrugThumb();
        drugStorage = po.getDrugStorage();
        drugPacking = po.getDrugPacking();
        drugExpirydate = po.getDrugExpirydate();
        drugApproval = po.getDrugApproval();
        drugCompany = po.getDrugCompany();
        drugNameGeneral = po.getDrugNameGeneral();
        drugUse = po.getDrugUse();
        return this;
    }
}
